package com.woniu.mqwork;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class AuditProduct {
    @Autowired
    private RabbitTemplate rabbitTemplate;
    /**
     *  参数1：交换机名称
     *  参数2：队列名称
     *  参数3：发送的消息
     */
    public void sendMessage(Integer userId){
        rabbitTemplate.convertAndSend("exchange-audit","queue-audit" + userId,"有新的申请审核完成，请查看！");
    }
}
